﻿using BarManager.Core.BusinessRules.Interfaces.Validator;
using BarManager.Core.BusinessRules.Specification;
using BarManager.Core.DomainService;
using BarManager.Core.Entity;

namespace BarManager.Core.BusinessRules.Validator
{
    public class EnvioValidator : BaseValidator<Envio>, IEnvioValidator
    {
        public EnvioValidator(IEnvioRepository repository, IProductoRepository productoRespository)
        {
            Rules.Add(new Rule<Envio>(ValidatorType.Add, new EnvioAddSpecification(repository, productoRespository)));
            Rules.Add(new Rule<Envio>(ValidatorType.Update, new EnvioUpdateSpecification(repository, productoRespository)));
        }
    }
}
